//
//  ViewController.m
//  Demo
//
//  Created by shaowei on 2/19/14.
//  Copyright (c) 2014 AISpeech. All rights reserved.
//

#import "ViewController.h"
#import "UncaughtExceptionHandler.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    
    @try {
        [self performSelector:@selector(hello) withObject:nil];
    }
    @catch (NSException *exception) {
        //将exception信息存储到本地文件内
        [UncaughtExceptionHandler TakeException:exception];
    }
    
//    @try {
//        [self performSelector:@selector(hello2) withObject:nil];
//    }
//    @catch (NSException *exception) {
//        //将exception信息存储到本地文件内
//        [UncaughtExceptionHandler TakeException:exception];
//    }
    
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)actionCrash:(id)sender {
    //test - 发生 没有被try捕捉到的 异常，导致程序崩溃，则会直接调用iPhone的邮件客户端，发送相关的崩溃说明
    [self performSelector:@selector(ww) withObject:nil afterDelay:0.3];
}


@end
